Gitolite - Configure User Permission
2013/03/06 |
Configure User Permission for Repositories.
|
|
[1] | For example, add permission for a user "cent" to a repository "public-repo". |
-sh-4.1$ cd /var/lib/gitolite/gitolite-admin/conf
-sh-4.1$
vi gitolite.conf # user name is just the name of SSH key file name repo public-repo RW+ = id_cent git commit -a -m "Change Permission for public-repo" -sh-4.1$ git push |
[2] | For example, add permission for a group "developer" to a repository "public-repo". |
-sh-4.1$ cd /var/lib/gitolite/gitolite-admin/conf
-sh-4.1$
vi gitolite.conf @developer = id_cent id_ubuntu repo public-repo RW = @developer git commit -a -m "Change Permission for public-repo" -sh-4.1$ git push |
[3] | For example, set permissions like follows. * id_redhat has all permission * deployer group has read/write permission for "prod" branch * developer group has read/write permission for "dlp" branch |
-sh-4.1$ cd /var/lib/gitolite/gitolite-admin/conf
-sh-4.1$
vi gitolite.conf @developer = id_cent id_ubuntu @deployer = id_debian id_fedora repo public-repo RW+ = id_redhat RW prod = @deployer RW dlp = @developer git commit -a -m "Change Permission for public-repo" -sh-4.1$ git push |